home *** CD-ROM | disk | FTP | other *** search
/ Pascal Super Library / Pascal Super Library (CW International)(1997).bin / DEBUG / WATCHES / WATCHES3.TXT < prev   
Text File  |  1996-06-21  |  2KB  |  67 lines

  1. (*
  2. WATCHES3 TXT   :example as mentioned in file "WATCHES.TXT". Also about
  3.                 CONST+"strings"+',m' or ',h' etc. Note the ASCII-chars
  4.                 below #32 - might be better not to print this file.
  5.                 Links to:
  6.                 See/text-search in file WATCHES.TXT for "WATCHES3.TXT".
  7. *)
  8.  
  9.  program x;
  10.  const s='aaa';
  11.        s2:string=#0#1#2#3#4' ';
  12.  var p:Pointer; pString:^string;
  13.  begin
  14.    p:=@s2[1];
  15.    pString:=@s2;
  16.  end.
  17.  ╔═[■]══════════════════════════════ Watches ═════════════════
  18.  ║ s: 'aaa'
  19.  ║ s,c: 'aaa'
  20.  ║ s,m: 'aaa'
  21.  ║ s2: #0#1#2#3#4' '
  22.  ║ s2,c: '  '
  23.  ║ s2[1],20md: 0 1 2 3 4 32 0 0 0 0 0 0 0 0 0 0 0 0 0 0
  24.  ║ p^,mmmmmmd: 0 1 2 3 4 32 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
  25.  ║ p^,mc: ' 
  26.  ║ p^,ms: #0#1#2#3#4' '#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#
  27.  ║ p^,mh: $0 $1 $2 $3 $4 $20 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0 $0
  28.  ║ p: Ptr(DSeg,$3)
  29.  ║ @p^: Ptr(DSeg,$3)
  30.  ║ p^: Ptr(DSeg,$3)
  31.  ║ pString: Ptr(DSeg,$2)
  32.  ║ @pString^: Ptr(DSeg,$2)
  33.  ║ pString^: #0#1#2#3#4' '
  34.  ║ pString^,c: '  '
  35.  ║ s2,h: #$0#$1#$2#$3#$4' '
  36.  
  37.  
  38.  BTW:
  39.  
  40.  "s2,h"
  41.  corresponds to the source-code syntax for chars
  42.  eg.
  43.    ch:=#$20  =  ch:=#32
  44.  
  45.  
  46.  "p^,mmmmmmd"
  47.  obviously, adding unnecessary specifiers can allow to have eg.
  48.  string variables' values positioned exactly "in the same columns"
  49.  for comparison. eg. if the variable names are of different length.
  50.  
  51.  
  52.  "s,m: 'aaa'"
  53.  Obviously "invalid/nonsense" format specifiers are simply ignored,
  54.  eg.
  55.     ╔═[■]══════════════════════════════ Watches ═════════════════
  56.     ║ s2,cc: '  '
  57.     ║ s2,cd: '  '
  58.     ║ s2,mmmmmmc: ' 
  59.     ║ s2,mcpdrh$: ' 
  60.     ║ s2,$hrdpcm: ' 
  61.  
  62.  
  63.  
  64.  
  65. Oct-1995
  66. jC,v960224
  67.